<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
 <div id="app">
     <span>{{firstName}} {{lastName}}</span> <br/>
     <span>{{getFullName()}}</span> <br/>
    <span>{{fullName}}</span> <br/>
     </div>


     <script src="js/vue.js"></script>
     <script>
       const app=new Vue({
         el: '#app',
         data: {
           message:'你好vue',
           firstName:'zhang',
           lastName: 'san',
         },
         methods:{
           getFullName:function(){
             console.log('getFullName')
             return this.firstName+' '+this.lastName;
           }
         },
         computed:{
           fullName:function(){
             console.log('fullName')
             return this.firstName+' '+this.lastName;
           }
         }
       })
     </script>
</body>
</html>